import axios from 'axios';
import {ajax,base} from './config'

/**
*首页接口
*/
//地图添加变电站标注，参数->sbId：
export const getStationIcon = params => { return axios.post(`${base}api/task/getTaskCountOfSbId.do`,params) };
//地图添加任务标注，参数->longitude:经度,latitude:纬度,departId:部门Id
export const getTaskIcon = params => { return axios.post(`${base}api/map.do?getTaskList`,params) };
//地图添加人员标注，参数
export const getWorkerIcon = params => { return axios.post(`${base}api/map.do?getWorkerList`,params) };

export const getWorkerListSum = params => {return axios.post(`${base}api/map.do?getWorkerListSum`,params)};
// api/map.do?getSubList
export const getSubList = params => {return axios.post(`${base}/bsSubstationController/getList.do`,params)};

export const getTaskListSum = params => {return axios.post(`${base}api/map.do?getTaskListSum`,params)};
//变电站类型，参数：departId
export const getSubTypes = params => { return axios.post(`${base}bsSubstationController.do?getSubTypes`,params) };
//部门树形菜单
export const getOtherDepart = params => { return axios.post(`${base}api/map.do?getOtherDepart`,params) };
//办公通知，参数:departId
export const getWorkNotice = params => { return axios.post(`${base}announcementController/getAnnouncementList.do`,params); };
//非主设备问题库，参数:departId
export const getProblemCtrl = params => { return axios.post(`${base}equipmentProblemController/problemForMap.do`, params); };
//值班安排及今天任务
export const getWorkInfo = params => { return axios.post(`${base}api/map.do?getLoginPageRight`, params); };
//安全学习，参数：departId
export const getLearning = params => { return axios.post(`${base}learningController/getIndexLearningList.do`, params); };
//人员履历人员列表，参数:departId
export const getGroupUser = params => { return axios.post(`${base}groupUserController.do?getAnnouncementList`, params); };
//人员履历人员信息，参数：userId
export const getUserInfo = params => { return axios.post(`${base}tbTaskController/finishUserInfo.do`, params); };